package com.wyzy.spring.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/logger")
public class LoggerConstroller {
//    Logger log = LoggerFactory.getLogger(LoggerConstroller.class);

    @RequestMapping("/getlogger")
    public int getLogger(){
        log.error("打印日志：error");
        log.warn("打印日志：warn");
        log.info("打印日志：info");
        log.debug("打印日志：debug");
        log.trace("打印日志：trace");
        return 1;
    }
}
